<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */
use Hyperf\HttpServer\Router\Router;

// 自定义多个route文件的话，新建一个存放route的目录
$routesPath = 'routes';
if (is_dir(BASE_PATH . DIRECTORY_SEPARATOR . $routesPath)) {
    for_load_routes($routesPath);
}

Router::addRoute(['GET', 'POST', 'HEAD'], '/', 'App\Controller\IndexController@index');
Router::get('/favicon.ico', function () {
    return '';
});

// Router::get('/test','App\Controller\IndexController@index');
// Router::addGroup('/index/',function (){
//    Router::get('redis','App\Controller\IndexController@getRedis');
// });
